Skip navigation links

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Big Data Appliance Perfect Balance Java API Reference Release 1 (1.0) E41667-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.hadoop.balancer.examples.invindx
Class InvertedIndexMapreduce.InvertedIndexMapper

`java.lang.Object
org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,InvertedIndex.InvertedIndexKey,InvertedIndex.InvertedIndexValue>
oracle.hadoop.balancer.examples.invindx.InvertedIndexMapreduce.InvertedIndexMapper`

Enclosing class:
  InvertedIndexMapreduce

      public static class InvertedIndexMapreduce.InvertedIndexMapper

extends org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,InvertedIndex.InvertedIndexKey,InvertedIndex.InvertedIndexValue>

Inverted Index mapper class for `TextInputFormat` and `FileSplit` This class uses the file name obtained from `FileSplit` as the location of the word, and the value of the LongWritable key of `TextInputFormat` as the offset of the word in that file.

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper
`org.apache.hadoop.mapreduce.Mapper.Context`

Constructor Summary
`InvertedIndexMapreduce.InvertedIndexMapper()`

Method Summary
`void` | `map(org.apache.hadoop.io.LongWritable keyIn, org.apache.hadoop.io.Text valueIn, org.apache.hadoop.mapreduce.Mapper.Context context)` The map function tokenizes each line in the input into words.
`void` | `setup(org.apache.hadoop.mapreduce.Mapper.Context context)` Initialize the key and value

Methods inherited from class org.apache.hadoop.mapreduce.Mapper
`run`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### InvertedIndexMapreduce.InvertedIndexMapper

    public InvertedIndexMapreduce.InvertedIndexMapper()

Method Detail

### setup

    public void setup(org.apache.hadoop.mapreduce.Mapper.Context context)
               throws java.io.IOException

  Initialize the key and value
  Overrides:
    `setup` in class `org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,InvertedIndex.InvertedIndexKey,InvertedIndex.InvertedIndexValue>`
  Throws:
    `java.io.IOException`

### map

    public void map(org.apache.hadoop.io.LongWritable keyIn,
                    org.apache.hadoop.io.Text valueIn,
                    org.apache.hadoop.mapreduce.Mapper.Context context)
             throws java.io.IOException,
                    java.lang.InterruptedException

  The map function tokenizes each line in the input into words. For each word, it outputs the word, its location (file name) and offset (offset within the file).
  Overrides:
    `map` in class `org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,InvertedIndex.InvertedIndexKey,InvertedIndex.InvertedIndexValue>`
  Throws:
    `java.io.IOException`
    `java.lang.InterruptedException`

Skip navigation links

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Big Data Appliance Perfect Balance Java API Reference Release 1 (1.0) E41667-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.